package com.zbkj.crmeb.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 首页样式
 * @Description: 
 * @author duyb
 * @date 2022-09-15
 */
public enum HomeStyleTemplateEnum implements IEnum<Integer> {
    /**
     * 类型
     */
    COMPREHENSIVE_MALL(1, "综合商城类"),
    FASHION_CONSUME(2, "时尚消费类"),
    IMPORT_FOOD(3, "进口食品类"),
    DRINKS_SHOW(4, "酒水饮料类"),
    COSMETICS_SHOW(5, "美妆日化类"),
    MOTHER_BABY(6, "母婴教玩类"),
    DIGITAL_FURNITURE(7, "数码家居类"),
    ;

    private final Integer code;
    private final String msg;

    HomeStyleTemplateEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @JsonCreator
    public static HomeStyleTemplateEnum valueOf(Integer code) {
        for (HomeStyleTemplateEnum value : values()) {
            if (code.equals(value.getCode())) {
                return value;
            }
        }
        return HomeStyleTemplateEnum.COMPREHENSIVE_MALL;
    }

    @Override
    @JsonValue
    public Integer getValue() {
        return code;
    }

}

